<?
//引入所有子系统信息
include_once("../../../common/script/extender_import.php");






$refund_apply_data=select_one_line_all_items($table_Prefix."order_refund_apply_data","nid = '".$_REQUEST ['nid']."'");

$refund_apply_stop_deliver=explode(",",$refund_apply_data['stop_deliver_date']);



$order_info=select_one_line_all_items($table_Prefix."order_info","order_id = '".$refund_apply_data ['order_nid']."'");
$order_detail=select_lines_all_items($table_Prefix."order_detail","","order_nid = '".$refund_apply_data ['order_nid']."'","");


$user=select_one_line_all_items($table_Prefix."member","nid = '".$order_info['user_id']."'");


//获取退款记录
$refund_info=select_lines_items($table_Prefix."event_refund_log","","add_date,price,nid","order_id = '{$order_info ['order_id']}'","");



$_product_id_list=transform_2darray_in_1darray_number_as_key($refund_info,"event_id");
$_product_id_list_str=implode("','",$_product_id_list);


$product_list=select_lines_all_items($table_Prefix."product_data","",
    "nid IN ('{$_product_id_list_str}')","");

$product_name_list=transform_2darray_in_1darray_with_new_key($product_list,"nid","title");

//print_r2($_product_id_list);
//print_r2($product_name_list);

//获取退款申请记录
$refund_apply_list=select_lines_all_items($table_Prefix."order_refund_apply_data","",
    "order_nid = '{$refund_apply_data ['order_nid']}' and
    nid != '{$_REQUEST ['nid']}'","");


$pay_status = [
    '0' => '待付款',
    '1' => '已付款',
    '2' => '已退款',
    '3' => '待退款'
];

?>

